﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ContactsGroupManage.aspx.cs"
    Inherits="Business_Cisoft3G_ContactsManage_ContactsManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>通讯录组管理</title>
    <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/font.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/style_ts.css" rel="stylesheet" type="text/css" />
    <asp:Literal ID="ltScript" runat="server"></asp:Literal>

    <script type="text/javascript" src="../../../js/Basic/BasicPage.js"></script>

    <script type="text/javascript" src="../../../js/jquery-1.4.2.min.js"></script>

    <script type="text/javascript" src="../../../js/jquery.blockUI.js"></script>

    <script type="text/javascript">
        $(document).ready(function() {
            $('#btnDelete').click(function() {
                var isChecked = false;
                var elm = $("input[type='checkbox']");
                elm.each(function() {
                    if ($(this).attr('checked') == true) {
                        isChecked = true;
                        return false;
                    }
                });

                if (isChecked) {
                    $('#hihDelete').val('true');

                    $('#lblTS').html('<p>&nbsp;</p><h5>你确认删除吗？一旦删除，该组下的所有联系人都会被删除！</h5>');
                    $('#btnConfirm2').show();
                    $('#btnCancel').show();
                    $('#btnBack_ts').hide();
                    $('#btnConfirm3').hide();
                    $.blockUI({
                        message: $('#Panel1'),
                        css: {
                            border: 'none',
                            padding: '15px',
                            backgroundColor: '',
                            top: ($(window).height() - 250) / 2 + 'px',
                            left: ($(window).width() - 500) / 2 + 'px'
                        }
                    });
                    $('#btnCloseAll2').click(function() {
                        $.unblockUI();
                    });
                    $('#btnCancel').click(function() {
                        $.unblockUI();
                    });
//                    $('#btnConfirm2').click(function() {
//                        //javascript:__doPostBack('LinkButton4', '');
//                        //$('#form1').submit();
//                        $('#LinkButton4').click();
//                        //                    $('#form1').submit();
//                    });
                }
                else {
                    $('#hihDelete').val('false');

                    $('#lblTS').html('<p>&nbsp;</p><h5>请选择要删除的记录！</h5>');
                    $('#btnBack_ts').hide();
                    $('#btnCancel').css('display', 'none');
                    $('#btnConfirm3').show();
                    $('#btnConfirm2').hide();
                    $.blockUI({
                        message: $('#Panel1'),
                        css: {
                            border: 'none',
                            padding: '15px',
                            backgroundColor: '',
                            top: ($(window).height() - 250) / 2 + 'px',
                            left: ($(window).width() - 500) / 2 + 'px'
                        }
                    });
                    $('#btnCloseAll2').click(function() {
                        $.unblockUI();
                    });
                    $('#btnCancel').click(function() {
                        $.unblockUI();
                    });
                    $('#btnConfirm3').click(function() {
                        $.unblockUI();
                    });
                }
            });
        });
    </script>

    <style type="text/css">
        .modalBackground
        {
            background-color: Gray;
            filter: alpha(opacity=70);
            opacity: 0.7;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <input type="hidden" value="" runat="server" id="hihDelete" />
    <asp:ScriptManager ID="Scriptmanager1" runat="server" EnableScriptGlobalization="true"
        EnableScriptLocalization="true">
    </asp:ScriptManager>
    <div class="position_list">
        <div class="position_left_list">
        </div>
        <div class="position_con_list">
            <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="30">
                        <img src="../../../Images/3G/icon21.gif" width="14" height="14" alt="" />
                    </td>
                    <td class="cyan12">
                        通讯录组管理 通讯录组管理
                    </td>
                </tr>
            </table>
        </div>
        <div class="position_right_list">
        </div>
    </div>
    <!--[if !搜素区域开始<![endif]-->
    <div class="search_list">
        <div class="search_top_list">
            <div class="search_topleft_list">
            </div>
            <!--  查询     -->
            <div class="search_topbg_list">
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="30" align="left" valign="middle" style="padding-top: 4px;">
                            <img src="../../../Images/3G/icon_logo.gif" width="22" height="22" />
                        </td>
                        <td width="100" class="cyan13_bold" style="padding-top: 5px;">
                            系统温馨提示栏
                        </td>
                        <td style="padding-top: 5px;">
                            <span style="color: White">点击带有<img src='../../../images/user/step1.gif' border='0'>图标的行可以展开</span>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="search_topright_list">
            </div>
        </div>
        <!--   列表(搜索条件、按钮)     -->
        <div class="index_search_con_list">
            <table border="0" cellpadding="0" cellspacing="0" style="padding-left: 10px">
                <tr>
                    <td>
                        <asp:Button ID="btnAdd" runat="server" Text="" OnClick="btnAdd_Click" CausesValidation="false" />
                        <%--<asp:Button ID="btnDelete" runat="server" Text="" CausesValidation="false"
                                    OnClick="Button1_Click" OnClientClick="if(CheckCheckBoxIsChecked(this)) {return confirm('您确认删除吗？一旦删除，该组下的所有联系人都会被删除！');}else{alert('请选择要删除的记录！ '); return false;}" />--%>
                        <%--<asp:Button ID="btnDelete" runat="server" Text="" OnClick="LinkButton2_Click" OnClientClick="if(CheckCheckBoxIsChecked(this)){document.getElementById('hihDelete').value = 'true';}else{document.getElementById('hihDelete').value = 'false';}" />--%>
                        <%-- <asp:Button ID="btnDelete" runat="server" Text="" />--%>
                        <input type="button" runat="server" id="btnDelete" />
                        <br />
                        <br />
                    </td>
                </tr>
            </table>
           <%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>--%>
                    <asp:GridView ID="gvitem" runat="server" OnPageIndexChanging="gvitem_PageIndexChanging"
                        AllowPaging="false" Width="100%" OnRowCreated="gvGroup_RowCreated" EmptyDataText="暂无"
                        OnRowDataBound="gvitem_RowDataBound" AutoGenerateColumns="false" OnRowCommand="gvGroup_RowCommand"
                        Style="border: 0px; background-color: #1E3541;" BorderColor="#006699" OnRowEditing="gvitem_RowEditing">
                        <Columns>
                            <asp:TemplateField HeaderText="序号" Visible="False" HeaderStyle-Width="50px" HeaderStyle-Height="35px"
                                ControlStyle-BorderWidth="0px" ControlStyle-BorderColor="White" ControlStyle-ForeColor="#0397a9">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="LblID" Text='<%# Eval("CG_ContactGroupID") %>' />
                                </ItemTemplate>
                                <ControlStyle BorderColor="White" BorderWidth="0px" ForeColor="#0397A9" />
                                <HeaderStyle Height="35px" Width="50px" />
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="选择" HeaderStyle-Width="50px" HeaderStyle-Height="35px">
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkSelect" runat="server" AutoPostBack="false" />
                                </ItemTemplate>
                                <HeaderStyle Height="35px" Width="50px" />
                                <ItemStyle HorizontalAlign="Center" Width="50px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="联系人组名称" HeaderStyle-Height="35px">
                                <ItemTemplate>
                                    <%--<asp:Label runat="server" ID="lbl_aShortName" Text='<%# Eval("CG_GroupName") %>'  CommandName="Group_expended"/>--%>
                                    <asp:LinkButton ID="lbl_aShortName" runat="server" Text='<%# Eval("CG_GroupName") %>'
                                        CommandName="Group_expended" Style="text-decoration: none; color: White;" CausesValidation="false"></asp:LinkButton>
                                </ItemTemplate>
                                <HeaderStyle Height="35px" />
                                <ItemStyle HorizontalAlign="Left" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="权重" HeaderStyle-Width="50px" HeaderStyle-Height="35px">
                                <ItemTemplate>
                                    <asp:Label runat="server" ID="lbl_AreaList" Text='<%# Eval("CG_Order") %>' />
                                </ItemTemplate>
                                <HeaderStyle Height="35px" Width="50px" />
                                <ItemStyle HorizontalAlign="Center" Width="80px" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="操作" HeaderStyle-Width="90px" HeaderStyle-Height="35px">
                                <ItemTemplate>
                                    <%--<a href='ContactsGroupEdit.aspx?id=<%# Eval("CG_ContactGroupID") %>' class="yellow12_link">
                                        修改</a>--%>
                                    <asp:LinkButton ID="lbtnUpdate" runat="server" CssClass="yellow12_link" CommandArgument='<%# Eval("CG_ContactGroupID") %>'
                                        CommandName="Edit" CausesValidation="false">修改</asp:LinkButton>
                                </ItemTemplate>
                                <HeaderStyle Height="35px" Width="90px" />
                                <ItemStyle HorizontalAlign="Center" Width="90px" />
                            </asp:TemplateField>
                        </Columns>
                        <PagerSettings Visible="False" />
                        <HeaderStyle BorderColor="White" BorderStyle="None" BorderWidth="0px" ForeColor="#0397A9"
                            Height="30px" />
                    </asp:GridView>
                <%--</ContentTemplate>
            </asp:UpdatePanel--%>
            <!--翻页-->
        </div>
    </div>
    <div class="search_bottom_list">
        <div class="search_bottomleft_list">
        </div>
        <div class="search_bottombg_list">
        </div>
        <div class="search_bottomright_list">
        </div>
    </div>
    <!--[if !IE]>搜素区域结束<![endif]-->
    <%--    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender3" runat="server" TargetControlID="LinkButton1"
        PopupControlID="appease_Panel1" BackgroundCssClass="modalBackground" OnOkScript="onOk()"
        DropShadow="true" PopupDragHandleControlID="appease_Panel2" CancelControlID="Close">
    </ajaxToolkit:ModalPopupExtender>
    <asp:Panel ID="appease_Panel1" runat="server" Style="display: none; background-color: #ffffdd;
        border-width: 3px; border-style: solid; border-color: Gray; padding: 3px; width: 500px;">
        <asp:Panel ID="appease_Panel2" runat="server" Style="cursor: move; background-color: #edc789;
            border: solid 1px Gray; color: Black; height: 20px; vertical-align: middle;">
            <div>
                <h3 style="text-align: center; height: 20px; vertical-align: middle;">
                    新增通讯录联系人组</h3>
            </div>
        </asp:Panel>
        <div>
            <asp:Panel ID="appease_Panel3" runat="server" Height="170px">
                <table border="2" cellpadding="5" cellspacing="1" bordercolor="#edc789" style="width: 500px;
                    text-align: center; background-color: #ffffff; border-collapse: collapse;">--%>
    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender3" runat="server" TargetControlID="LinkButton1"
        PopupControlID="appease_Panel1" BackgroundCssClass="modalBackground" OnOkScript="onOk()"
        DropShadow="false" PopupDragHandleControlID="appease_Panel2" CancelControlID="btnCloseAll">
    </ajaxToolkit:ModalPopupExtender>
    <asp:Panel ID="appease_Panel1" runat="server" Style="display: none; width: 550px;
        vertical-align: middle;">
        <div class="attention">
            <asp:Panel ID="appease_Panel2" runat="server" Style="vertical-align: middle;">
                <div class="attention_top">
                    <div class="attention_topleft">
                    </div>
                    <div class="attention_topmid">
                        <table width="98%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="left" valign="middle" class="title">
                                    <asp:Label ID="lblTitle" runat="server" Text=""></asp:Label>
                                </td>
                                <td align="right" valign="middle" width="30">
                                    <asp:Button ID="btnCloseAll" runat="server" Text="" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="attention_topright">
                    </div>
                </div>
            </asp:Panel>
            <div class="attention_con">
                <asp:Panel ID="appease_Panel3" runat="server">
                    <table border="1" runat="server" id="tableTS" cellpadding="1" cellspacing="0" bordercolor="#0e62a7"
                        style="width: 100%; text-align: center; border-collapse: collapse;">
                        <tr>
                            <td align="right">
                                <span style="color: Red;">*</span>填写组名称：
                            </td>
                            <td style="width: 350px; text-align: left">
                                <asp:TextBox ID="txtGroupName" runat="server" Width="180px"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfv2" runat="server" Display="Dynamic" ErrorMessage="请填写组名称"
                                    ControlToValidate="txtGroupName"></asp:RequiredFieldValidator>
                                <asp:Label ID="lblGroupID" runat="server" Text="" Visible="false"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <span style="color: Red;">*</span>选择上级联系人组：
                            </td>
                            <td style="width: 350px; text-align: left">
                                <asp:DropDownList ID="ddlUpperGroup" runat="server">
                                </asp:DropDownList>
                                <asp:Label ID="lblSelectUpperGroup" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                <span style="color: Red;">*</span>输入权重：
                            </td>
                            <td style="width: 350px; text-align: left">
                                <asp:TextBox ID="txtOrder" runat="server"></asp:TextBox>
                                <br />
                                <span>权重为0~99的数字，数字越大，排列越靠前</span>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" Display="Dynamic"
                                    ErrorMessage="请输入权重" ControlToValidate="txtOrder"></asp:RequiredFieldValidator>
                                <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server" Mask="99"
                                    MaskType="Number" TargetControlID="txtOrder">
                                </ajaxToolkit:MaskedEditExtender>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="请输入两位数字"
                                    ControlToValidate="txtOrder" ValidationExpression="\d{2}">
                                </asp:RegularExpressionValidator>
                                <asp:Label ID="lblRecive" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="navi_link" colspan="2">
                                <asp:Button ID="btnConfirm" runat="server" ToolTip="确定" OnClick="btnConfirm_Click" />
                                <asp:Button ID="btnUpdate" runat="server" Text="" OnClick="btnUpdate_Click" />
                                <%--<asp:Button ID="Close" runat="server" Text="" />--%>
                                <asp:Button ID="CancleButton" runat="server" Text="Cancle" Visible="false" />
                            </td>
                        </tr>
                        <%--</table>
            </asp:Panel>
        </div>
    </asp:Panel>--%>
                    </table>
                </asp:Panel>
            </div>
        </div>
    </asp:Panel>
    <%--<asp:LinkButton ID="LinkButton1" runat="server" Visible="true" OnClick="LinkButton1_Click"></asp:LinkButton>--%>
    <%--<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="LinkButton2"
        PopupControlID="Panel1" BackgroundCssClass="modalBackground" OnOkScript="onOk()"
        DropShadow="false" PopupDragHandleControlID="Panel2" CancelControlID="btnCloseAll2">
    </ajaxToolkit:ModalPopupExtender>--%>
    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender2" runat="server" TargetControlID="LinkButton2"
        PopupControlID="Panel1" BackgroundCssClass="modalBackground" OnOkScript="onOk()"
        DropShadow="true" PopupDragHandleControlID="Panel2" CancelControlID="btnCloseAll2">
    </ajaxToolkit:ModalPopupExtender>
    <asp:Panel ID="Panel1" runat="server" Style="display: none; width: 450px; vertical-align: middle;">
        <div class="attention">
            <asp:Panel ID="Panel2" runat="server" Style="vertical-align: middle;">
                <div class="attention_top">
                    <div class="attention_topleft">
                    </div>
                    <div class="attention_topmid">
                        <table width="98%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="left" valign="middle" class="title">
                                    提示信息
                                </td>
                                <td align="right" valign="middle" width="30">
                                    <asp:Button ID="btnCloseAll2" runat="server" Text="" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="attention_topright">
                    </div>
                </div>
            </asp:Panel>
            <div class="attention_con">
                <asp:Panel ID="Panel3" runat="server">
                    <table border="1" runat="server" id="table2" cellpadding="5" cellspacing="0" bordercolor="#0e62a7"
                        style="width: 100%; text-align: center; border-collapse: collapse;">
                        <tr>
                            <td style="text-align: Center">
                                <asp:Label ID="lblTS" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="navi_link">
                                <asp:Button ID="btnBack_ts" runat="server" ToolTip="返回" />
                                <asp:Button ID="btnConfirm2" runat="server" ToolTip="确定" OnClientClick="$.unblockUI();javascript:__doPostBack('LinkButton4','');"
                                    Style="display: none" />
                                <asp:Button ID="btnCancel" runat="server" Text="" Style="display: none" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </div>
        </div>
    </asp:Panel>
    <asp:LinkButton ID="LinkButton3" runat="server"></asp:LinkButton>
    <asp:LinkButton ID="LinkButton1" runat="server" Visible="true" OnClick="LinkButton1_Click"></asp:LinkButton>
    <asp:LinkButton ID="LinkButton2" runat="server" Visible="true" OnClick="LinkButton2_Click"></asp:LinkButton>
    <asp:LinkButton ID="LinkButton4" runat="server" Visible="true" OnClick="LinkButton2_Click"></asp:LinkButton>
    >
    </form>
</body>
</html>
